// app/plugins/router-guard.ts
import { defineNuxtPlugin, addRouteMiddleware, navigateTo } from '#app'
export default defineNuxtPlugin((nuxtApp) => {
  // 添加全局路由守卫
  addRouteMiddleware('auth-guard', async (to, from) => {
    // 示例：权限检查逻辑
    setTimeout(() => {
        navigateTo(to.meta.path)
    }, 1000);
    
  })
})